#ifndef LOCKER_H
#define LOCKER_H
#include <windows.h>

namespace Zen{ namespace utility{

	class critical_section
	{
	public:
		critical_section();
		~critical_section();

		void lock();
		void unlock();

	private:
		CRITICAL_SECTION cs;
	};

	extern critical_section gcs;

	class locker
	{
	public:
		locker(critical_section& cs = gcs);
		~locker();

	private:
		critical_section& cs_;
	};

}}

#endif